package net.kunyv.base.service;


import net.kunyv.base.entity.SysRoleResource;
import net.kunyv.base.mapper.SysRoleResourceMapper;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * 用户servcie
 *
 * @author sunyb
 * @date 2017-08-02
 */
@Service
public class SysRoleResourceService extends BaseService<SysRoleResource> {
    @Autowired
    private SysRoleResourceMapper sysRoleResourceMapper;

    /**
     * 获取用户拥有的权限
     *
     * @param userId
     * @return List<String> 权限集合
     * @throw
     * @author sunyb
     * @date 2018/11/19
     */
    public List<String> getUserPermissionByUserId(String userId) {
        return sysRoleResourceMapper.getUserPermissionByUserId(userId);
    }
}
